package com.sgb.kjwl.api.service;

import com.sgb.kjwl.model.entity.self.LeaseInquiryCountEntity;
import com.swgk.core.base.model.factory.BaseUrlInterceptor;
import com.swgk.core.util.PickSelectEntity;
import com.sgb.kjwl.model.entity.ProListEntity;
import com.sgb.kjwl.model.entity.pick.UserInquiryForTender;
import com.sgb.kjwl.model.entity.self.UserInquiryEntity;
import com.swgk.core.base.model.entity.BaseEntity;

import java.util.List;
import java.util.Map;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.POST;
import retrofit2.http.Query;

/**
 * 函询模块接口
 */
public interface InquiryAPI {

    //新增用户函询-租赁
    @POST("v1/app/leaseinquiry/addInquery")
    Call<BaseEntity> addInquery(@Body UserInquiryForTender userInquiryForTender);

    //回复函询
    @POST("v1/app/leaseinquiry/replyEnquire")
    Call<BaseEntity> replyEnquire(@Body Map map);

    //函询 类型(租赁)
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZL,"tokenType:pc"})
    @GET("v1/app/leaseinquiry/getInquiryType")
    Call<BaseEntity<List<PickSelectEntity>>> getInquiryType(@Query("type") String type);

    // 我发起函询
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZL,"tokenType:pc"})
    @POST("v1/app/leaseinquiry/getMyInquiry")
    Call<BaseEntity<ProListEntity<List<UserInquiryEntity>>>> getMyInquiry(@Body Map map);

    // 我收到的函询
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZL,"tokenType:pc"})
    @POST("v1/app/leaseinquiry/getMyreplay")
    Call<BaseEntity<ProListEntity<List<UserInquiryEntity>>>> getMyReplay(@Body Map map);

    // 统计函询数量
    @Headers({BaseUrlInterceptor.HEADERS_URL_ZL,"tokenType:pc"})
    @GET("v1/app/leaseinquiry/enquireCount")
    Call<BaseEntity<LeaseInquiryCountEntity>> getEnquireCount();

}
